solving mixed operations